package factory;

public class AnimalFactory {

	public Animal createAnimal(String name, String type) {
		if (type.equals("Bird")) {
			return new Bird(name);
		} else if (type.equals("Dog")) {
			return new Dog(name);
		} else {
			return null;
		}
	}

}
